package com.service.Impl;

import com.dao.IconDao;
import com.mypg.Icon;
import com.service.IconService;

import java.util.List;

public class IconServiceImpl implements IconService {

    private IconDao iconDao;

    public IconServiceImpl(){}
    public IconServiceImpl(IconDao iconDao) {
        this.iconDao = iconDao;
    }

    @Override
    public List<Icon> selectAllIcon() {
        return iconDao.selectAllIcon();
    }

    @Override
    public Icon selectIconByIcon_id(int icon_id) {
        return iconDao.selectIconByIcon_id(icon_id);
    }

    @Override
    public List<Icon> selectIconFor_icon_table_jsp(String icon_class, int start_row, int page_nums) {
        return iconDao.selectIconFor_icon_table_jsp(icon_class,start_row,page_nums);
    }

    @Override
    public int selectIcon_count_For_icon_table_jsp(String icon_class) {
        return iconDao.selectIcon_count_For_icon_table_jsp(icon_class);
    }

    @Override
    public int selectIcon_count() {
        return iconDao.selectIcon_count();
    }

    @Override
    public void insertIcon(Icon icon) {
        iconDao.insertIcon(icon);
    }

    @Override
    public void deleteIconByIcon_id(int icon_id) {
        iconDao.deleteIconByIcon_id(icon_id);
    }

    @Override
    public void updateIconByIcon_id(Icon icon) {
        iconDao.updateIconByIcon_id(icon);
    }

    @Override
    public void updateIcon_imgByIcon_id(String icon_img, int icon_id) {
        iconDao.updateIcon_imgByIcon_id(icon_img,icon_id);
    }


    public IconDao getIconDao() {
        return iconDao;
    }

    public void setIconDao(IconDao iconDao) {
        this.iconDao = iconDao;
    }
}
